package com.cloud.exception;

/**
 * 公共异常定义
 *
 * @author yzj
 */
public class CommonException extends BaseException {

    public static final CommonException SERVER_NO_EXITS = new CommonException(451, "服务未找到或服务断开");
    public static final CommonException SERVER_URL_ERROR = new CommonException(452, "请求服务异常:");
    public static final CommonException PATH_NO_EXITS = new CommonException(453, "请求路径不存在:请检查路径是否正确");
    public static final CommonException REPEATED_SUBMIT = new CommonException(454, "操作频繁:请10秒重试");
    public static final CommonException FREQUENT_VISITS = new CommonException(455, "访问过于频繁，请重试");
    public static final CommonException SYSTEM_ERROR = new CommonException(456, "内部错误:请联系管理员");

    public static final CommonException PARAMETER_IS_INVALID = new CommonException(461, "参数不符合规范，不能进行查询");
    public static final CommonException BUCKET_NO_EXITS = new CommonException(462, "操作失败：存储桶或文件不存在");
    public static final CommonException FILE_NO_EXITS = new CommonException(463, "操作失败：上传文件不存在");
    public static final CommonException UPLOAD_IMAGE_ERROR = new CommonException(464, "操作失败：上传文件不是图片类型");

    public static final CommonException RAM_IS_NOT_ERROR = new CommonException(471, "内存不足异常:");
    public static final CommonException INSTANTIATE_ERROR = new CommonException(472, "实例化异常:");
    public static final CommonException SQL_ERROR = new CommonException(474, "SQL错误:");

    public static final CommonException ROCKET_MQ_SEND_ERROR = new CommonException(481, "RocketMQ发送消息异常");

    private static final long serialVersionUID = 1L;

    public CommonException() {
        super();
    }

    public CommonException(Integer code, String msg, Object... args) {
        super(code, msg, args);
    }
}
